-- Decompiled with the Synapse X Luau decompiler.

local l__CommonOHOH__1 = _G.CommonOHOH;
local v2 = {};
local l__BadgeService__1 = game:GetService("BadgeService");
function v2.CheckIfOwnBadge(p1, p2, p3)
	if not p2 then
		return false;
	end;
	local v3, v4 = pcall(function()
		return l__BadgeService__1:UserHasBadgeAsync(p2.UserId, p3);
	end);
	return v4;
end;
function v2.CheckBadgeIsEnable(p4, p5)
	local v5, v6 = pcall(function()
		return l__BadgeService__1:GetBadgeInfoAsync(p5);
	end);
	if not v5 then
		warn("\232\142\183\229\143\150\229\190\189\231\171\160\228\191\161\230\129\175\230\151\182\229\135\186\233\148\153\239\188\129");
		return false;
	end;
	return v6.IsEnabled, v6.IconImageId;
end;
function v2.AwardBadge(p6, p7, p8)
	if not p7 then
		warn("player miss");
	end;
	if not p6:CheckBadgeIsEnable(p8) or not (not p6:CheckIfOwnBadge(p7, p8)) then
		return false;
	end;
	l__BadgeService__1:AwardBadge(p7.UserId, p8);
	return true;
end;
return v2;
